package ae.pcfc.cldos.online.common.clddb.domain;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.envers.Audited;


/**
 * The persistent class for the T_CLDOS_MESSAGE_ATTACHMENT database table.
 * 
 */
@Entity
@Table(name="T_CLDOS_MESSAGE_ATTACHMENT")
@Audited
public class MessageAttachment implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@GeneratedValue(strategy=GenerationType.AUTO)
	@Column(name="MA_ID")
	private long maId;

	@Column(name="MA_ATCHMNT_PATH")
	private String maAtchmntPath;

	@Column(name="MA_FILE_EXT")
	private String maFileExt;

	@Column(name="MA_FILE_NAME")
	private String maFileName;

	@Column(name="MA_TYPE")
	private String maType;

	//bi-directional many-to-one association to MessageInbox
	@ManyToOne(fetch=FetchType.LAZY)
	@JoinColumn(name="MI_MSG_ID")
	private MessageInbox MessageInbox;

    public MessageAttachment() {
    }

	public long getMaId() {
		return this.maId;
	}

	public void setMaId(long maId) {
		this.maId = maId;
	}

	public String getMaAtchmntPath() {
		return this.maAtchmntPath;
	}

	public void setMaAtchmntPath(String maAtchmntPath) {
		this.maAtchmntPath = maAtchmntPath;
	}

	public String getMaFileExt() {
		return this.maFileExt;
	}

	public void setMaFileExt(String maFileExt) {
		this.maFileExt = maFileExt;
	}

	public String getMaFileName() {
		return this.maFileName;
	}

	public void setMaFileName(String maFileName) {
		this.maFileName = maFileName;
	}

	public String getMaType() {
		return this.maType;
	}

	public void setMaType(String maType) {
		this.maType = maType;
	}

	public MessageInbox getMessageInbox() {
		return this.MessageInbox;
	}

	public void setMessageInbox(MessageInbox MessageInbox) {
		this.MessageInbox = MessageInbox;
	}
	
}